#!/bin/sh

# postinst script for libc
#
# see: dh_installdeb(1)

#set -e

# summary of how this script can be called:
#        * <postinst> \`configure' <most-recently-configured-version>
#        * <old-postinst> \`abort-upgrade' <new version>
#        * <conflictor's-postinst> \`abort-remove' \`in-favour' <package>
#          <new-version>
#        * <postinst> \`abort-remove'
#        * <deconfigured's-postinst> \`abort-deconfigure' \`in-favour'
#          <failed-install-package> <version> \`removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

PATH=/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

if [ "${BASEDIR:=/}" = "/" ]; then
    BASEDIR=""
fi

case "$1" in
    configure)
#    if [ "$BASEDIR" = "/" ]; then
#	LIBC_MOE_32=`/usr/bin/moe -32 '/usr/lib/libc/$HWCAP'`
#	if [ -n "$LIBC_MOE_32" ]; then
#	    /usr/sbin/mount | egrep -s "^/lib/libc.so.1 on "
#	    if [ $? -ne 0 ]; then
#		/usr/sbin/mount -O -F lofs $LIBC_MOE_32 /lib/libc.so.1
#	    fi
#	fi
#    fi
	/usr/bin/chmod +x ${BASEDIR}/lib/ld.so.1
	/usr/bin/chmod +x ${BASEDIR}/lib/amd64/ld.so.1
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument '$1'" >&2
        exit 1
    ;;
esac



# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
	/usr/bin/crle -u
        if [ `/usr/bin/isainfo -b` = "64" ]; then
	    /usr/bin/crle -64 -u
	fi
fi
# End automatically added section


exit 0

